package guo.controller;


import guo.util.R;
import org.springframework.http.HttpRequest;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@RestController
public class MvcInterceptorController {

    @GetMapping("/interceptor")
    public R getOneIntervrptor(HttpServletRequest request){

        HttpSession session = request.getSession();
        Object auth = session.getAttribute("auth");
        System.out.println(auth);


        System.out.println("成功到达controller");
        return R.ok();
    }
}

